package com.ld.security.common.quartz.modules.job.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class SuperJob extends QuartzJobBean {

    public boolean before(JobExecutionContext jobExecutionContext){
        return true;
    }

    public boolean after(JobExecutionContext jobExecutionContext){
        return false;
    }

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try {
            this.before(jobExecutionContext);
            this.after(jobExecutionContext);
        }catch (Exception e){
            e.printStackTrace();
        }


    }
}